<template>
  <div class="plat-form-wrap">
    <!-- <Banner :bgImg="bgImg" :search="true"></Banner> -->
    <div class="body-wrap home-mini-width infoSearch">
      <TitleCard
        :title="item.title"
        :showMore="false"
        :loading="loading"
        :isEmpty="isEmpty"
        :isSwitch="false"
        :type="'threeCard'"
        v-for="(item,index) in infoList"
        :key="index"
      >
        <TableCard
          :tableList="item.list"
          @moreChange="moreChange"
          height="160"
          :textType="'firstText'"
        ></TableCard>
      </TitleCard>
    </div>
  </div>
</template>

<script>
import TableCard from '@/components/common/tableCard.vue'
// import Banner from '@/views/components/banner.vue'
import { mapGetters, mapMutations } from 'vuex'
import { infoList } from './config.js'
import mixinsBackStack from '@/views/backstageSupport/mixins'
import { getLink } from '@/api/frontCommon'

export default {
  mixins: [mixinsBackStack],
  data() {
    return {
      // bgImg: require('@/assets/images/patentBanner.png'),
      loading: false,
      isEmpty: false,
      infoList,
      total: 0,
    }
  },
  components: {
    // Banner,
    TableCard,
  },
  computed: {
    ...mapGetters('user', ['visitor']),
  },
  methods: {
    ...mapMutations('headerMenu', ['updateMenuItemStatus']),
    async moreChange(val) {
      const { data } = await getLink(val.id)
      window.open(data.link)
    },
    toDetail(id) {
      this.$router.push({ name: 'generalInfoDetails', query: { id } })
    },
    // 切换页面
    handleChange(e) {
      this.params.pageNum = e
      this.initDefaultValue()
    },
  }
}
</script>
